package cn.echoedu.dao.mydb;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;


public interface BaseDao {
	public abstract <T> boolean putInfo(Connection con,TableName tableName,T 
			  currentPojo,boolean running) throws SQLException;
	  
	  public abstract<T> boolean deleteFrom(Connection con,TableName tablename,T
			  currentPojo) throws SQLException;
   
	  public abstract <T> boolean updateInfo(Connection con,TableName tableName,T oldPojo,
			  T currentPojo) throws SQLException;

	  public abstract <T> List<T> getAll(Connection con,TableName tableName)throws
	   SQLException;
	  
	  public abstract <T> List<T> getAllForInput(Connection con,TableName tableName,
			  String columnName,String searchValue) throws SQLException;
	  
	  public abstract <T> T getPojoForPrimarKey(Connection con,TableName tableName,
			  String primaryKey) throws SQLException;
	  
	  public abstract <T> boolean alreadyExisting(Connection con,TableName tableName,
			  String primaryKey) throws SQLException;
	  
	  public abstract <T> boolean alreadyExisting(Connection con,TableName tableName,
			  T currentPojo) throws SQLException;
	  public abstract <T> List<T> getPojoForLeftJoinAndColumn(Connection con,TableName lefttablename,
				TableName righttablename,String leftcolumn,String rightcolumn,
				String column,String value, String sortbysql) 
						throws SQLException;
	public abstract <T> List<T> getPojoBySql(Connection con,TableName tablename,String sql) throws SQLException;


}
